//
//  BlockPostAFNYiBu.m
//  UI_封装AFN
//
//  Created by mac on 15/9/10.
//  Copyright (c) 2015年 lanou3g.com蓝欧科技. All rights reserved.
//

#import "BlockPostAFNYiBu.h"

@implementation BlockPostAFNYiBu

+ (void)PostAfnURLWithString:(NSString *)urlStr Body:(NSDictionary *)body resultBlock:(BlockPostAfnResult)resultBlcok errorBlock:(BlcokPostAfnError)errorBlock
{
    AFHTTPRequestOperationManager *netManager = [AFHTTPRequestOperationManager manager];
    netManager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/plain",@"text/json",@"application/json",@"text/javascript",@"text/html",nil];
    [netManager POST:urlStr parameters:body success:^(AFHTTPRequestOperation *operation, id responseObject) {
        resultBlcok(responseObject);
        
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        
        errorBlock(error);
    }];

}
@end
